package com.croofr.utils.string;

import com.croofr.utils.exceptions.DefenseException;

/**
 * Defense checkers for String.
 * <p/>
 * User: bednar<br/>
 * Date: Jan 24, 2010<br/>
 * Time: 1:12:55 PM
 */
public final class StringDefense
{
    /**
     * Throw DefenseException if string is null or empty.
     *
     * @param string for check
     * @see com.croofr.utils.exceptions.DefenseException
     */
    public static void notEmpty(String string)
    {
        if (StringUtils.isEmpty(string))
        {
            throw new DefenseException("String is empty!");
        }
    }
}
